Nested reports (subreports)

Sometimes it is required to display in a particular place additional data, which may represent a separate report with rather complicated structure. One can try to construct such report by using a set of FastReport bands, but it is not always possible. In such cases, the "Subreport" object can be used  .

After inserting such object to a report, we can see that FastReport automatically adds a new page, connected to this object. A nested report resembles a multipage one in terms of structure. The only difference is that the nested report is displayed in a specified place of the basic report, and not after it. When creating a report, as soon as the "Subreport" object occurs, the report, allocated in the connected page, will be displayed. After that, basic report creation will continue.

One can also place the "Subreport" object on a nested report page, thus increasing enclosure level. An example of such report can be found in the demo program, the "Subreports" report.

It should be noted that the FastReport’s ability to construct subreports enables to increase nesting level of data. Remember that number of enclosure levels in FastReport is limited when you do not use the "Subreport" object (not more than six).